Skip to content

feat: list owned animals with their last coordinates - #43

Merged
Drefvelin merged 1 commit into
mainfrom
feat/list-owned-animals
Sep 24, 2026
Merged

Drefvelin merged 1 commit into
mainfrom
feat/list-owned-animals

Conversation

@Drefvelin

@Drefvelin Drefvelin commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds /animals (alias /livestock) so a player can see every animal they own or co-own, with the last block each one was seen at.
  • Stores that location when the animal loads, on the minute tick, on unload, and on shutdown, and prints a chat roster with status and click-to-copy coordinates.
  • Staff with cooking.admin can run /animals <player> for someone who has joined.

Documentation impact

  • Central Cooking documentation: updated in TF-Minecraft/Docs docs/list-owned-animals
  • Player wiki (ProvinceSystem /wiki/animal-husbandry): updated in TF-Minecraft/ProvinceSystem feat/animals-list-wiki

Contract

  • Affected behavior: new player command and husbandry schema migration user_version 7 → 8 (world, x, y, z). Existing rows keep their data and show no coordinates until the animal loads once.
  • Tests run (mvn test): 199 tests, 0 failures. Includes roster formatting and a version-7 database migration.
  • Player wiki: updated

Test plan

  • /animals with no animals explains how to claim one
  • Owned and co-owned animals list name, species, status, and coordinates
  • Clicking coordinates copies world x, y, z
  • An animal that has not loaded yet says the location is not recorded
  • A player cannot list someone else's animals; staff and the console can
  • Restart keeps coordinates for an animal that was loaded before shutdown

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added the /animals command, with /livestock as an alias, to view your animal roster and where each animal was last seen.
    • Administrators can look up another player’s roster. Listings include animal details, ownership roles, status, and coordinates that can be clicked to copy.
    • Animal locations are saved and remain available when animals are not currently loaded.

Players need a readable way to find livestock that is not loaded, so /animals records the last block each animal was seen at and prints the roster in chat.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 17a9a3c2-53b2-431e-bb69-48081eead63e

📥 Commits

Reviewing files that changed from the base of the PR and between 7f62052 and a40683d.

📒 Files selected for processing (12)
  • src/main/java/net/tfminecraft/cooking/Cooking.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryAnimal.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryAnimalsCommand.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryLifecycleListener.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryLocation.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryOwned.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryRepository.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryRoster.java
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryTickTask.java
  • src/main/resources/plugin.yml
  • src/test/java/net/tfminecraft/cooking/husbandry/HusbandryRepositoryTest.java
  • src/test/java/net/tfminecraft/cooking/husbandry/HusbandryRosterTest.java
 ______________________________________________________________
< Good things come to those who commit early and review often. >
 --------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@Drefvelin
Drefvelin merged commit 280b8ef into main Sep 24, 2026
1 of 2 checks passed
@Drefvelin
Drefvelin deleted the feat/list-owned-animals branch September 24, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant